package yogiro.to;

public class MessageTO {
	private int messageNo;
	private String messageTitle;
	private String messageContent;
	private String messageWritedate;
	private String messageWriter;
	private String messageReceiver;
	private int receive;
	private int send;
	private int relevel; 
	
	public MessageTO(){}

	
	public MessageTO(int messageNo, String messageTitle, String messageContent,
			String messageWriter, String messageReceiver) {
		super();
		this.messageNo = messageNo;
		this.messageTitle = messageTitle;
		this.messageContent = messageContent;
		this.messageWriter = messageWriter;
		this.messageReceiver = messageReceiver;
	}


	public MessageTO(String messageTitle, String messageContent,
			String messageWriter, String messageReceiver) {
		super();
		this.messageTitle = messageTitle;
		this.messageContent = messageContent;
		this.messageWriter = messageWriter;
		this.messageReceiver = messageReceiver;
	}

	public MessageTO(int messageNo, String messageTitle, String messageContent,
			String messageWritedate, String messageWriter,
			String messageReceiver, int receive, int send, int relevel) {
		super();
		this.messageNo = messageNo;
		this.messageTitle = messageTitle;
		this.messageContent = messageContent;
		this.messageWritedate = messageWritedate;
		this.messageWriter = messageWriter;
		this.messageReceiver = messageReceiver;
		this.receive = receive;
		this.send = send;
		this.relevel = relevel;
	}

	public int getReceive() {
		return receive;
	}

	public void setReceive(int receive) {
		this.receive = receive;
	}

	public int getSend() {
		return send;
	}

	public void setSend(int send) {
		this.send = send;
	}

	public int getRelevel() {
		return relevel;
	}

	public void setRelevel(int relevel) {
		this.relevel = relevel;
	}

	public int getMessageNo() {
		return messageNo;
	}

	public void setMessageNo(int messageNo) {
		this.messageNo = messageNo;
	}

	public String getMessageTitle() {
		return messageTitle;
	}

	public void setMessageTitle(String messageTitle) {
		this.messageTitle = messageTitle;
	}

	public String getMessageContent() {
		return messageContent;
	}

	public void setMessageContent(String messageContent) {
		this.messageContent = messageContent;
	}

	public String getMessageWritedate() {
		return messageWritedate;
	}

	public void setMessageWritedate(String messageWritedate) {
		this.messageWritedate = messageWritedate;
	}

	public String getMessageWriter() {
		return messageWriter;
	}

	public void setMessageWriter(String messageWriter) {
		this.messageWriter = messageWriter;
	}

	public String getMessageReceiver() {
		return messageReceiver;
	}

	public void setMessageReceiver(String messageReceiver) {
		this.messageReceiver = messageReceiver;
	}

	@Override
	public String toString() {
		return "MessageTO [messageNo=" + messageNo + ", messageTitle="
				+ messageTitle + ", messageContent=" + messageContent
				+ ", messageWritedate=" + messageWritedate + ", messageWriter="
				+ messageWriter + ", messageReceiver=" + messageReceiver
				+ ", receive=" + receive + ", send=" + send + ", relevel="
				+ relevel + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((messageContent == null) ? 0 : messageContent.hashCode());
		result = prime * result + messageNo;
		result = prime * result
				+ ((messageReceiver == null) ? 0 : messageReceiver.hashCode());
		result = prime * result
				+ ((messageTitle == null) ? 0 : messageTitle.hashCode());
		result = prime
				* result
				+ ((messageWritedate == null) ? 0 : messageWritedate.hashCode());
		result = prime * result
				+ ((messageWriter == null) ? 0 : messageWriter.hashCode());
		result = prime * result + receive;
		result = prime * result + relevel;
		result = prime * result + send;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (!(obj instanceof MessageTO))
			return false;
		MessageTO other = (MessageTO) obj;
		if (messageContent == null) {
			if (other.messageContent != null)
				return false;
		} else if (!messageContent.equals(other.messageContent))
			return false;
		if (messageNo != other.messageNo)
			return false;
		if (messageReceiver == null) {
			if (other.messageReceiver != null)
				return false;
		} else if (!messageReceiver.equals(other.messageReceiver))
			return false;
		if (messageTitle == null) {
			if (other.messageTitle != null)
				return false;
		} else if (!messageTitle.equals(other.messageTitle))
			return false;
		if (messageWritedate == null) {
			if (other.messageWritedate != null)
				return false;
		} else if (!messageWritedate.equals(other.messageWritedate))
			return false;
		if (messageWriter == null) {
			if (other.messageWriter != null)
				return false;
		} else if (!messageWriter.equals(other.messageWriter))
			return false;
		if (receive != other.receive)
			return false;
		if (relevel != other.relevel)
			return false;
		if (send != other.send)
			return false;
		return true;
	}


	
	
}